package com.aopcinemas.cinema.model;

import jade.content.Concept;

import java.util.List;

public class SeatRow implements Comparable<SeatRow>, Concept {

    private static final long serialVersionUID = 1L;

    private List<Seat> seats;
    private Integer number;

    public SeatRow(Integer number) {
        super();
        this.number = number;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public List<Seat> getSeats() {
        return seats;
    }

    public void setSeats(List<Seat> seats) {
        this.seats = seats;
    }

    public static class Seat implements Comparable<Seat>, Concept {

        private static final long serialVersionUID = 1L;

        private int number;

        public Seat() {
        }

        public Seat(int number) {
            this.number = number;
        }

        public int getNumber() {
            return number;
        }

        public void setNumber(int number) {
            this.number = number;
        }

        @Override
        public int compareTo(Seat other) {
            return new Integer(number).compareTo(other.number);
        }

    }

    @Override
    public int compareTo(SeatRow other) {
        return new Integer(number).compareTo(other.number);
    }

}
